Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs.rs build for datafusion-proto (hopefully) #10254

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Apr 26, 2024

Which issue does this PR close?

Closes #10163

Rationale for this change

Docs.rs is broken failed for https://docs.rs/crate/datafusion-proto/latest

Screenshot 2024-04-21 at 1 04 04 PM

The build has a log https://docs.rs/crate/datafusion-proto/37.0.0/builds/1179419 shows the error that the generated module isn't working

What changes are included in this PR?

Remove cfg to get working again (maybe)

Are these changes tested?

No -- I don't know how to test them. In the other hands the docs are broken so this isn't going to make them any more broken 🤷

Are there any user-facing changes?

@@ -17,7 +17,6 @@

#[allow(clippy::all)]
#[rustfmt::skip]
#[cfg(not(docsrs))]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was added in #3580 but now that the code is vendored (doesn't require running protoc at compile time) I think it should work

However, I don't really understand why it stopped working in the first place 🤔

@alamb alamb changed the title Fix docs.rs build for datafusion-proto Fix docs.rs build for datafusion-proto (hopefully) Apr 26, 2024
@alamb alamb added the documentation Improvements or additions to documentation label Apr 26, 2024
Copy link
Contributor

@phillipleblanc phillipleblanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last successful docs.rs build was DF 35 - I took a look at the commits in the proto directory between 35 and 36 and couldn't see anything obvious that would have caused this to fail.

Agree that we should give this a shot and see what happens in #10217

@leoyvens
Copy link
Contributor

A command that tests this is:
cargo +nightly rustdoc --config 'build.rustdocflags=["--cfg", "docsrs", "--cap-lints", "warn"]'

I took this from the docs.rs build logs. By running locally, I can confirm that this patch fixes the docs build.

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks @alamb

@comphead comphead merged commit 76e4138 into apache:main Apr 27, 2024
24 checks passed
@alamb
Copy link
Contributor Author

alamb commented Apr 30, 2024

A command that tests this is: cargo +nightly rustdoc --config 'build.rustdocflags=["--cfg", "docsrs", "--cap-lints", "warn"]'

I took this from the docs.rs build logs. By running locally, I can confirm that this patch fixes the docs build.

Thank you @leoyvens -- that is quite clever.

@alamb alamb deleted the alamb/docs_rs_build branch April 30, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs.rs build fails for datafusion-proto 37.0.0
4 participants